home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: Formatted print with variable output field width.
- Date: 10 Apr 1996 12:02:33 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4kg80p$5bg@sparcserver.lrz-muenchen.de>
- References: <berlinerDpMBoE.AEn@netcom.com>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- berliner@netcom.com (Guy Berliner) writes:
-
- >Does anyone know of a way of creating a variable output field width?
- >Say, for example, I wish to have a width of v+3, where v is some
- >integer, the result of some calculation. Is there some way to say
- >something like
-
- > printf("%<v+3>.<v>f", floatingnum);
-
- >where the result of the evaluation of v+3 and of v will be
- >fed to printf?
-
- The documentation that came with your standrd C library should
- describe the meaning of '*' in a format string for printf() and
- similar functions.
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
-